<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>添加轮播图</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/src/layui.js"></script>
    <script src="/layui/src/jquery-3.2.1.min.js"></script>
    <link rel="stylesheet" href="css/CourseAdd.css">
    <script type="text/javascript" src="js/CarouselEdit.js"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>
</head>

    <form class="layui-form "  id="form_id">
        <div class="layui-row" id="List_Header">
            <div class="layui-col-xs7 layui-col-sm8 layui-col-md9 layui-col-lg10">
                <span id="color_id">▉</span>
                <span id="List_Header_span">添加轮播图</span>
            </div>
            <div class="layui-col-xs1 layui-col-sm1 layui-col-md1 layui-col-lg1" id="div_btn">
                <button type="button" class="layui-btn layui-btn-sm" id="refresh" onclick="refresh1()">
                    <i class="layui-icon layui-icon-refresh"></i> &nbsp;刷新
                </button>
            </div>
            <div class="layui-col-xs1 layui-col-sm1 layui-col-md1 layui-col-lg1" id="div_btn2">
                <button type="button" class="layui-btn layui-btn-sm" onclick="xadmin.add_tab('返回','/public/System.html')" id="go_id">
                    <i class="layui-icon layui-icon-left"></i> 返回
                </button>
            </div>
            <input type="hidden" id="createUser" name="createUser" />
        </div>

        <div id="div_id">

            <div class="layui-form-item">
                <label class="layui-form-label">名称：</label>
                <div class="layui-input-block">
                    <input type="text" name="imgTitle" required lay-verify="required"  autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <p id="p_id">您当前选择的商品类别是：<span></span></p>

            <div class="layui-form-item radio_class">
                <label class="layui-form-label">上线/下线：</label>
                <div class="layui-input-block type">
                    <input type="radio" name="display" value="1" title="上线" lay-filter="status" id="Type" checked="checked"/>
                    <input type="radio" name="display" value="2" title="下线" lay-filter="status"/>
                </div>
            </div>

            <!--轮播图类型-->
            <div class="layui-form-item">
                <label class="layui-form-label la">轮播图类型：</label>
                <div class="layui-input-block">
                    <select  id="imgType" name="imgType" lay-verify="required" lay-search>
                        <option value="">请选择轮播图类型</option>
                        <option value="1">商品</option>
                        <option value="2">视频</option>
                    </select>
                </div>
            </div>

            <!--开始时间-->
            <div class="layui-form-item">
            <label class="layui-form-label">开始时间：</label>
            <div class="layui-input-block">
                <input type="text" name="startDate" id="createDate" required lay-verify="required"  autocomplete="off" class="layui-input"/>
            </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">结束时间：</label>
                <div class="layui-input-block">
                    <input type="text" name="expireDate" id="expireDate" required lay-verify="required"  autocomplete="off" class="layui-input"/>
                </div>
            </div>

                <!--课程图片-->
                <div class="layui-form-item upload_div">
                    <label class="layui-form-label">轮播图片：</label>
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn upload_btn" onclick="uploadBtnImg()">上传图片</button>
                        <input type="hidden" id="uploadImgBtn"/>
                    </div>
                </div>

                <!--获取轮播主图-->
                <input type="hidden" id="url" name="url" class="layui-input"/>

                <!--预览图-->
                <div class="layui-form-item" id="img_divs">
                    <label class="layui-form-label">预览图：</label>
                    <div id="img_div3">
                        <div class="layui-input-block" id="img_div4">

                        </div>
                    </div>
                </div>


                <!--课程视频-->
                <div class="layui-form-item upload_div">
                    <label class="layui-form-label">轮播视频：</label>
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn upload_btn" onclick="uploadBtn()">上传视频</button>
                        <input type="hidden" id="uploadBtn2"/>
                    </div>
                </div>
                <!--上传视频-->
                <div class="layui-form-item" id="div_video">

                    <!--进度条-->
                    <div class="layui-progress layui-progress-big" lay-showPercent="yes" lay-filter="progressBar" id="progressBar">
                        <div class="layui-progress-bar layui-bg-blue" lay-percent="0%"></div>
                    </div>

                </div>
                <input type="hidden" id="courseUrl" name="courseUrl"/>

                <!--视频时长-->
                <input type="hidden" id="courseTime" name="courseTime">


            <!--课程标签-->
            <div class="layui-form-item">
                <label class="layui-form-label">内容备注：</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea textarea" name="remarks1" id="product_description2" placeholder="请输入标签"></textarea>
                    <input type="hidden" name="remarks" />
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block" id="btn_id">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
                </div>
            </div>
            <!--上架状态-->
            <input type="hidden" name="courseStatus" value="3"/>
            <input type="hidden" name="courseCstatus" value="3">
        </div>
    </form>
</div>
<!--预览图点击计数-->
<input type="hidden" id="num"/>
</body>
</html>
